<?php
/* @var $this GnuhealthPatientController */
/* @var $model GnuhealthPatient */

$this->breadcrumbs=array(
	'Gnuhealth Patients'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List GnuhealthPatient', 'url'=>array('index')),
	array('label'=>'Create GnuhealthPatient', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#gnuhealth-patient-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Gnuhealth Patients</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'gnuhealth-patient-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'create_date',
		'write_date',
		'create_uid',
		'write_uid',
		'family',
		/*
		'photo',
		'sex',
		'blood_type',
		'general_info',
		'primary_care_doctor',
		'critical_info',
		'rh',
		'current_address',
		'ethnic_group',
		'name',
		'dob',
		'marital_status',
		'dod',
		'current_insurance',
		'cod',
		'identification_code',
		'deceased',
		'works_at_home',
		'prison_current',
		'fam_apgar_score',
		'domestic_violence',
		'hostile_area',
		'sexual_abuse',
		'sewers',
		'hours_outside',
		'ses',
		'education',
		'television',
		'occupation',
		'drug_addiction',
		'fam_apgar_timesharing',
		'electricity',
		'housing',
		'school_withdrawal',
		'income',
		'single_parent',
		'ses_notes',
		'fam_apgar_affection',
		'gas',
		'internet',
		'telephone',
		'water',
		'fam_apgar_discussion',
		'working_children',
		'fam_apgar_help',
		'trash',
		'teenage_pregnancy',
		'prison_past',
		'relative_in_prison',
		'fam_apgar_decisions',
		'full_term',
		'colposcopy',
		'breast_self_examination',
		'pap_test',
		'mammography',
		'menopause',
		'stillbirths',
		'pap_test_last',
		'fertile',
		'colposcopy_last',
		'menopausal',
		'mammography_last',
		'abortions',
		'premature',
		'menarche',
		'gravida',
		'sexuality_info',
		'smoking_number',
		'sexual_partners',
		'soft_drinks',
		'coffee',
		'exercise_minutes_day',
		'sexual_practices',
		'ex_drug_addict',
		'sexual_preferences',
		'car_child_safety',
		'alcohol',
		'ex_alcoholic',
		'age_start_drugs',
		'number_of_meals',
		'coffee_cups',
		'exercise',
		'sex_with_prostitutes',
		'sleep_during_daytime',
		'age_quit_smoking',
		'ex_smoker',
		'lifestyle_info',
		'car_seat_belt',
		'diet_info',
		'drug_iv',
		'second_hand_smoker',
		'age_quit_drugs',
		'alcohol_liquor_number',
		'eats_alone',
		'age_quit_drinking',
		'sex_oral',
		'home_safety',
		'age_start_drinking',
		'first_sexual_encounter',
		'smoking',
		'sex_anal',
		'age_start_smoking',
		'sexual_partners_number',
		'car_revision',
		'motorcycle_rider',
		'helmet',
		'alcohol_beer_number',
		'traffic_laws',
		'sleep_hours',
		'alcohol_wine_number',
		'diet',
		'anticonceptive',
		'prostitute',
		'salt',
		'drug_usage',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
